﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace EDMS.SMS
{
    public partial class Xjxx : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack && !IsCallback)
            {                
                if (Request.QueryString["xjbh"] != null)
                {
                    string xjbh = Request.QueryString["xjbh"];
                    using (DAL.DataClassesDataContext dc = new DAL.DataClassesDataContext())
                    {
                        DAL.Xjdj xj = dc.Xjdj.FirstOrDefault(x => x.xjbh == xjbh);
                        if (xj != null)
                        {
                            lab_xjbh.Text = xj.xjbh;
                            ddl_flag.SelectedValue = xj.flag;
                            lab_flag.Text = ddl_flag.SelectedItem.Text;
                            lab_xjmc.Text = xj.xjmc;
                            lab_phone.Text = xj.xjphone;
                            lab_wtsj.Text = xj.wtjssj.ToString();
                            lab_xjsj.Text = xj.xjsj.ToString();
                        }
                    }
                }
            }
        }


    }
}